package com.matrix.common.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @author 有点甜
 * @since 2025/7/25
 * @param <T>
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class PageResult<T> extends Result<List<T>> {

    private long total;
    private long pages;

    public PageResult(List<T> data, long total, long pages) {
        this.setData(data);
        this.total = total;
        this.pages = pages;
        this.setCode(200);
        this.setMessage("成功");
    }
}
